class CreateBonusRecords < ActiveRecord::Migration[5.2]
  def change
    create_table :bonus_records do |t|
      t.integer :admin_id
      t.integer :user_id
      t.integer :order_count, default: 0
      t.decimal :bonus, :precision => 10, :scale => 2, :default => 0.0, comment: "分红"
      t.date :give_at, default: "now()"

      t.timestamps
    end
  end
end
